#include<stdio.h>
#include<string.h>

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        printf("Usage: %s [-a|-b|-c]\n",argv[0]);
        return 1;
    }

    const char *arg = argv[1];

    if(strcmp(arg,"-a") == 0)
        printf("这是功能a\n");
    else if(strcmp(arg,"-b") == 0)
        printf("这是功能b\n");

    else if(strcmp(arg,"-c") == 0)
        printf("这是功能c\n");
    else
        printf("Usage: %s [-a|-b|-c]\n",argv[0]);
   
    // for(int i = 0; i < argc; i++)
    // {
    //     printf("argv[%d]:%s\n",i,argv[i]);
    // }
    return 0;
}
